// import { RootObject } from '../types/search'
import { instanceW} from '../utils/request'
//获取搜索的关键字和热门关键字
export const gethotKey:any= () => instanceW.get('/xhr/search/init.json?csrf_token=6ae897351097e6c38c59bd215102be58')
  //获取实时数据
export const getrealtime:any= (data:string) => instanceW.post('/xhr/search/searchAutoComplete.json?',`keywordPrefix=${data}`)
// 获取数据
export const getdata:any= (timestamp:number,keyword:string,floorPrice:number,upperPrice:number,descSorted:boolean,_stat_search:string) => instanceW.get(`/xhr/search/search.json?__timestamp=${timestamp}&needPopWindow=true&searchWordSource=1&stillSearch=false&itemId=0&size=40&upperPrice=${upperPrice}&floorPrice=${floorPrice}&matchType=0&categoryId=0&descSorted=${descSorted}&sortType=0&keyword=${keyword}&`+`_stat_search=${_stat_search}`)




// export const reqCgethotKey = () => {
//   instanceW.get<any,RootObject>('/xhr/search/init.json?csrf_token=6ae897351097e6c38c59bd215102be58')
// }